package com.company.project.service;

import com.company.project.model.Role;
import com.company.project.core.Service;
import com.company.project.model.RoleAuthority;
import com.company.project.model.User;
import com.company.project.util.PageUtil;

import java.util.List;


/**
 * Created by CodeGenerator on 2018/10/08.
 */
public interface RoleService extends Service<Role> {
    /**
     * 删除角色
     */
    Boolean deleteRole(Integer rid);

    /**
     * 查询角色和权限
     */
    PageUtil<Role> selectRoleWithAuthority(Integer pageIndex);
    /**
     * 数量
     */
    Integer selectRoleUnm();

    /**
     * 更新role
     *
     * @param roleAuthority
     * @return
     */
    Boolean upRole(RoleAuthority roleAuthority);

    /**
     * 查询
     * @return
     */
    List<Role> selectRole();

    /**
     * 添加角色
     */
    Boolean addRole(RoleAuthority roleAuthority);

}
